package com.zxw.设计模式.设计原则.里氏替换;

/**
 * @projectName: util-cloud
 * @package: com.zxw.设计模式.设计原则.里氏替换
 * @className: RebateStrategy
 * @author: zhangxuewei
 * @description: TODO
 * @date: 2023/4/24 16:37
 * @version: 1.0
 */
public class RebateStrategy implements Istrategy {
    private final double rate;

    public RebateStrategy() {
        this.rate = 0.8;
    }

    public double realPrice(double consumePrice) {
        return consumePrice * this.rate;
    }
}
